# 设置 CMake 路径
set(CMAKE_COMMAND "D:/JetBrains/CLion 2025.2.2/bin/cmake/win/x64/bin/cmake.exe")
set(CMAKE_PREFIX_PATH "D:/Qt/6.6.3/mingw_64")
cmake_minimum_required(VERSION 3.14)

# 设置可执行文件输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# 确保bin目录存在
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

project(mainwindow LANGUAGES CXX)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt6 REQUIRED COMPONENTS Widgets)

add_executable(mainwindow
    main.cpp
    mainwindow.cpp
    mainwindow.h
    mainwindow.ui
)

target_link_libraries(mainwindow PRIVATE Qt6::Widgets)
